<?php

class Core_Action_Admin_System_Content_Index extends Action_Admin
{
	function execute($request, $initial = FALSE)
	{
		if ($initial)
		{
			Agilet::setVar('breadcrum', array(
				array(
					'url' => 'admin/system',
					'label' => 'System'
				),
				array(
					'url' => 'admin/system/content',
					'label' => 'Content'
				),
			));

		}

		$table = Model::getTable('core/content');

		$select = $table -> select();
		$items = $table -> fetchAll($select);

		$title = 'Content Type';

		$data = array(
			'title' => $title,
			'items' => $items
		);

		$request -> response = View::render($script = 'core/html/admin/system/content/index', $data);
	}

}
